package com.gexiaobao.pigeon.ui.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.gexiaobao.pigeon.R
import com.gexiaobao.pigeon.app.base.DataBindBaseViewHolder
import com.gexiaobao.pigeon.app.model.bean.CheckInfoListBean
import com.gexiaobao.pigeon.databinding.ItemCheckSignInfoBinding

/**
 * @Author      : hxw
 * @Date        : 2024/7/17 9:32
 * @Describe    :
 */
class AdapterCheckSignInfo : BaseQuickAdapter<CheckInfoListBean, DataBindBaseViewHolder>(R.layout.item_check_sign_info) {
    override fun convert(holder: DataBindBaseViewHolder, item: CheckInfoListBean) {
        val binding = DataBindBaseViewHolder.getBinding(holder) as ItemCheckSignInfoBinding
        binding.data = item
        binding.executePendingBindings()//防止列表抖动

        val sb = StringBuilder()
        item.projectName.forEach {
            sb.append(it + "\n")
        }
        holder.setText(R.id.tvItemRaceGroup, sb.toString().trim())
    }
}